package com.yizn.learn.springext.disposablebean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

/**
 * project : my-learn
 * <p> 10.关闭容器前 </p>
 *
 * @author yisl
 * @date 2023-01-13【星期五】
 **/
@Service
public class DService implements InitializingBean, DisposableBean {
    @Override
    public void destroy() throws Exception {
        System.out.println("摧毁前执行");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("InitializingBean afterPropertiesSet");
    }
}
